<!-- Data Tables -->
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>{:lang('Transaction value Increment')}</h5>
                </div>
                <div class="ibox-content">

                    <form class="form-horizontal m-t" action="{:url('purse/increment')}" onsubmit="return sumbit_sure()" method="post">

                        <div class="form-group">
                            <label class="col-sm-3 control-label">{:lang('Available transaction value')}：</label>
                            <div class="col-sm-8">
                                <input minlength="2" type="text" readonly="true" class="form-control" value="{$info.transaction}" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">{:lang('Increment Quota')}：</label>
                            <div class="col-sm-8">
                                <input id="btc" type="text" class="form-control" name="num" value="" aria-required="true">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-3">
                                <button class="btn btn-primary" type="submit" >{:lang('Submit')}</button>
                            </div>
                        </div>

                        
                    </form>
                </div>

                <div class="ibox-content">
                    
                        <table id="table" data-toggle="gridview" class="table" data-url="{:url('admin/purse/increment_gettmbc')}" data-toolbar="#toolbar" data-show-columns="true" data-page-size="20" data-page-list="[10, 25, 50, All]" data-unique-id="id" data-pagination="true" data-side-pagination="client" data-search="true" data-click-to-select="false">
                        <thead>
                            <tr>
                                <th data-width="50" data-field="num" >{:lang('Increment Quota')}</th>
                                <th data-width="50" data-field="source" >{:lang('Source value')}</th>
                                <th data-width="50" data-field="weighted" >{:lang('Weighted value')}</th>
                                <th data-width="80" data-field="dt" data-align="center">{:lang('Date')}</th>
                            </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">

    function operateFormatter(value, row, index) {
        return [
            '<a class="btn btn-xs edit" href="javascript:void(0)" title="{$Think.lang.Edit}">',
            '<i class="fa fa-edit"></i>',
            '</a>  ',
            '<a class="btn btn-xs delete" href="javascript:void(0)" title="{$Think.lang.Delete}">',
            '<i class="fa fa-trash"></i>',
            '</a>'
        ].join('');
    }

    var operateEvents = {
        'click .edit': function (e, value, row, index) {
            var param = {
                url: "{:url('admin/user/edit');}",
                data: {id: row.id}
            }
            $("#table").gridView('loadModal', param.url,param.data)
        },
        'click .delete': function (e, value, row, index) {
            $("#table").gridView('deleteModal', 'delete', row)
            
        }
    };
</script>
<script type="text/javascript">

    function sumbit_sure(){
        
        if(confirm("{:lang('Please confirm whether the value-added scheme is implemented or not.')}")){
            return true;
        }
        return false;
    } 
</script>  
